﻿using System;

namespace Core
{
    /// <summary>
    /// Business object which holds the information about an item in category.
    /// Is used for both WorePress and BlogEngine.
    /// </summary>
    public class CategoryItem
    {
        private string _parentId;

        /// <summary>
        /// Gets or sets the Id of the category post.
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// Gets or sets the Description of the category post.
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets the name of the category post.
        /// </summary>
        public string Name { get; set; }
        
        /// <summary>
        /// Sets or gets the WordPress category nice name.
        /// </summary>
        public string WpNiceName { get; set; }
        
        /// <summary>
        /// Sets or gets the WordPress category parent id.
        /// </summary>
        public string WpParentId { get; set; }

        public string ParentId
        {
            get
            {
                if (this._parentId == null)
                {
                    return String.Empty;
                }
                return this._parentId;
            }
            set { this._parentId = value; }
        }
    }
}
